package com.gujia.designpattern.proxysrc;

import com.gujia.designpattern.Test;
import com.gujia.designpattern.TestInterface;

public class Client {


    public static void main(String[] args) throws Exception {
        Test test = new Test();

        InvocationHandler handler = (InvocationHandler) new SelfPrintHandler(test);
        TestInterface testInterface = (TestInterface)Proxy.newProxyInstance(TestInterface.class,handler);

        testInterface.example();
    }
}
